package com.yanmaohu.yulia.bean;

import java.util.List;

/**
 * @author Bright Lee
 */
public final class GroupingSetList {

    private int beginIndex;
    private int endIndex;
    private List<GroupingSet> groupingSetList;

    public GroupingSetList(List<GroupingSet> groupingSetList) {
        this.beginIndex = groupingSetList.get(0).getBeginIndex();
        this.endIndex = groupingSetList.get(groupingSetList.size() - 1).getEndIndex();
        this.groupingSetList = groupingSetList;
    }

    public int getBeginIndex() {
        return beginIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public int size() {
        return groupingSetList.size();
    }

    public GroupingSet get(int index) {
        return groupingSetList.get(index);
    }

}
